Repository navigation
Two rows of core/test/readonly-window-reads.test.js were green on a tree that drew the read-only window's screen empty. This hardens both with a test that fails when the read path stops carrying what the row paints. - #2852
Merged
Merged
Conversation
…metrics table (ThinkFlowLab#2847) Two rows of core/test/readonly-window-reads.test.js passed on a tree that drew the screen empty: - `tasks` asked only whether some card in the list had id `task-1`, so a list of duplicates or a card whose view had lost the fields the row paints stayed green. It now pins the list itself: one row, plus that card's own id, title, column, queueRole and status. - `project-board` checked the metrics through `Object.values(metrics).every(value => value === null)`, which is vacuously true on `{}`: an answer with no metric keys at all drew a header of missing numbers and passed. It now pins the seven keys the header draws, then their null values, and keeps `ok === false` / `reason: no-credentials`. Red first, on the base tree, with each read path broken in turn (the task view dropping `title`, `emptyMetrics()` answering `{}`): the old assertions stayed green 3/3 twice; the new ones named both rows and failed twice; with the read paths restored they pass 3/3 twice. Test-only: no source, no client and no patch logic change. The overlay copy `patches/ds-bot/files/test/readonly-window-reads.test.js` is `generate`d and byte-identical to the core copy. Fixes ThinkFlowLab#2847
Contributor
Author
|
@Birfy — T1 review request at tip 18 checks at this tip: 16 success + 2 skipped, 0 failure — Please enqueue this tip. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two rows of
core/test/readonly-window-reads.test.jswere green on a tree that drew the read-only window's screen empty. This hardens both with a test that fails when the read path stops carrying what the row paints.What was wrong
tasksrow only asked whether some card in the list hadid === 'task-1'. A list of duplicates, or a card whose view had lost the fields the row paints (title,column,queueRole), still passed.project-boardrow checked the metrics throughObject.values(metrics).every(value => value === null)— vacuously true on{}. An answer with no metric keys at all, i.e. a header of missing numbers, still passed.What changed
Test-only; no source, no client and no patch logic change.
core/test/readonly-window-reads.test.js— thetasksrow pins the list itself:Array.isArray,length === 1, and that card's ownid,title,column(waiting),queueRole(Dev) andstatus(open). Theproject-boardrow pins the seven metric keys the header draws (prsOpenedToday,prsMergedToday,issuesOpenedToday,issuesClosedToday,prMergeMedianMs,issueCloseMedianMs,taskDoneMedianMs), then theirnullvalues, and keepsok === falsewithreason: no-credentials.patches/ds-bot/files/test/readonly-window-reads.test.js— the same bytes, written bynode scripts/ds-bot-patches.mjs generate(core/test/is a whole-file overlay entry);diff -qagainst the core copy is identical andds-bot-patches checkreports10 patches apply cleanlyandcore/ equals ds-bot/ + patches/ds-bot/.No changelog fragment: this is a test-only change with no user-visible behaviour.
Red first, then green
On the base tree, with each read path broken in turn and restored with
git checkoutafterwards: the task view droppingtitle(core/src/host/tasks.js) andemptyMetrics()answering{}(plugins/project/src/project-metrics.js).# tests 3 / # pass 3 / # fail 0, twice.tasks:answered a card with notitle,project-board:answeredmetrics.metricswith no keys.# tests 3 / # pass 3 / # fail 0, twice.Verify
TZ=UTC npm run verifyat this commit: core lint88/0, plugin lint 0 errors,10 patches apply cleanly, core3086/3086,social 619 / tree 149 / timeline 172 / workflow 528 / project 147,.github+policysuite675 tests / 674 pass / 1 fail— the one red is the known#749machine item, which names only this host's.cache/wt-2547/**worktree and not any file of this change.generate/check/canonicalno-op.Fixes #2847
Owner: Dev-5
Reviewer: Birfy
Written-by: Dev-5
Bot: Dev-5
Claim-Id: c2c105030e81439c913e450dcb9015cb
Risk tier: T1
Base: ff9c5db
Checkpoint
{ "pr": 2852, "claim": "Dev-5", "issue": 2847, "summary": "Two rows of core/test/readonly-window-reads.test.js were green on a tree that drew the read-only window empty. The tasks row now pins the list itself — one row, that card's id, title, column, queueRole and status — instead of asking whether some card had the id. The project-board row pins the seven metric keys the header draws, then their nulls, because Object.values(...).every(null) is vacuously true on {}. Both went red twice on a broken read path while the old assertions stayed green, and pass twice with the paths restored.", "files": [ "core/test/readonly-window-reads.test.js", "patches/ds-bot/files/test/readonly-window-reads.test.js" ], "checks": { "ran": "TZ=UTC npm run verify; node --test test/readonly-window-reads.test.js; node scripts/ds-bot-patches.mjs check", "result": "green", "at": "b2fb8660a15ca70a3f912326c55438761453a1ff" }, "next": "none — ready for review" }